home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
serial
/
callback.001
/
callback~
/
callback
/
lib
/
dbase
/
ageof.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-22
|
352b
|
19 lines
#include "dbase.p"
unsigned ageof(char *fname)
{
struct stat
ss;
unsigned
secs;
if (stat(fname, &ss))
return (0); /* no file: no time lapsed */
secs = (unsigned)difftime(time(NULL), ss.st_mtime);
log(log_on, "Age of '%s': %u secs", fname, secs);
return (secs);
}